﻿<phone:PhoneApplicationPage
    x:Class="MVBuddy.InfoPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">
	
	<shell:SystemTray.ProgressIndicator>
		<shell:ProgressIndicator />
	</shell:SystemTray.ProgressIndicator>

	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar>
			<shell:ApplicationBarIconButton Text="actualizar" IconUri="/Assets/AppBar/appbar.refresh.rest.png" Click="RefreshClick" />
			<shell:ApplicationBarIconButton Text="anclar tile" IconUri="/Assets/AppBar/appbar.favs.addto.rest.png" Click="PinTileClick" />
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>


    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource Locator}}">
    	<Grid.Background>
    		<ImageBrush Stretch="Fill" ImageSource="/MVBuddy;component/Assets/bg.png"/>
    	</Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Background="{StaticResource MVGradient}">
            <TextBlock x:Name="ApplicationTitle" Text="MV BUDDY" Style="{StaticResource PhoneTextNormalStyle}" Margin="12" FontSize="{StaticResource PhoneFontSizeLarge}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
        	<StackPanel Margin="0,12,0,0">
        		<TextBlock TextWrapping="Wrap" Text="{Binding Main.UserData.Username}" Foreground="Black" FontSize="{StaticResource PhoneFontSizeMediumLarge}"/>
        		<Button BorderBrush="Black" Command="{Binding Main.NavigateNotificationsCommand, Mode=OneWay}">
        			<Button.Foreground>
        				<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
        			</Button.Foreground>
					<Button.Content>
						<StackPanel Orientation="Horizontal">
							<TextBlock Text="Ver " FontSize="{StaticResource PhoneFontSizeNormal}"/>
							<TextBlock Text="{Binding Main.UserData.NotificationCount}" FontSize="{StaticResource PhoneFontSizeNormal}" />
							<TextBlock Text=" avisos" FontSize="{StaticResource PhoneFontSizeNormal}"/>
						</StackPanel>
					</Button.Content>
        		</Button>
        		<Button BorderBrush="Black" Command="{Binding Main.NavigateFavoritesCommand, Mode=OneWay}">
        			<Button.Foreground>
        				<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
        			</Button.Foreground>
					<Button.Content>
						<StackPanel Orientation="Horizontal">
							<TextBlock Text="Ver " FontSize="{StaticResource PhoneFontSizeNormal}"/>
							<TextBlock Text="{Binding Main.UserData.FavoriteCount}" FontSize="{StaticResource PhoneFontSizeNormal}" />
							<TextBlock Text=" favoritos" FontSize="{StaticResource PhoneFontSizeNormal}"/>
						</StackPanel>
					</Button.Content>
        		</Button>
        		<Button BorderBrush="Black" Command="{Binding Main.NavigateMessagesCommand, Mode=OneWay}">
        			<Button.Foreground>
        				<SolidColorBrush Color="{StaticResource MVDarkOrange}"/>
        			</Button.Foreground>
					<Button.Content>
						<StackPanel Orientation="Horizontal">
							<TextBlock Text="Ver " FontSize="{StaticResource PhoneFontSizeNormal}"/>
							<TextBlock Text="{Binding Main.UserData.MessageCount}" FontSize="{StaticResource PhoneFontSizeNormal}" />
							<TextBlock Text=" mensajes" FontSize="{StaticResource PhoneFontSizeNormal}"/>
						</StackPanel>
					</Button.Content>
        		</Button>
        	</StackPanel>

        </Grid>
    </Grid>

</phone:PhoneApplicationPage>